﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Microfinance_Management
{
    public partial class track_date : Form
    {
        public track_date()
        {
            InitializeComponent();
        }

        unsafe private void track_date_Load(object sender, EventArgs e)
        {
            StringBuilder date = new StringBuilder(30);
            int loan_num = 0 ;
            Research_dll.Out_dateStr();
            int i = 0;
            listView1.View = View.Details;
            while (Research_dll.GetOut_date(&loan_num, date)) 
            {
                listView1.Items.Add(loan_num.ToString());
                listView1.Items[i].SubItems.Add(date.ToString());
                ++i;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string id = listView1.SelectedItems[0].Text;
            Due_date dd = new Due_date(id);
            dd.ShowDialog();
        }
    }
}
